
import fetch from '../../utils/http/fetch.js'
import consts from '../../utils/http/consts.js'

const ROOT = './cs/org';

export default {  
  list(data, suc, err) {
    return fetch(data, suc, err, consts.HttpMethod.POST, `${ROOT}/list`);
  },
  new(data, suc, err) {
    return fetch(data, suc, err, consts.HttpMethod.POST, `${ROOT}/new`);
  },
  update(data, suc, err) {
    return fetch(data, suc, err, consts.HttpMethod.POST, `${ROOT}/update`);
  }, 
  delete(data, suc, err) {
    return fetch(data, suc, err, consts.HttpMethod.POST, `${ROOT}/delete`);
  }, 
  sort(data, suc, err) {
    return fetch(data, suc, err, consts.HttpMethod.POST, `${ROOT}/ud`);
  },
  level(data, suc, err) {
    return fetch(data, suc, err, consts.HttpMethod.POST, `${ROOT}/level`);  // 获取盟市、县单位列表
  },
  type(data, suc, err) {
    return fetch(data, suc, err, consts.HttpMethod.POST, `${ROOT}/type`);  // 类型列表
  }  
}
